load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/crypto/test_utils/canister_threshold_sigs",
    "//rs/crypto/test_utils/ni-dkg",
    "//rs/crypto/test_utils/reproducible_rng",
    "//rs/crypto/test_utils/vetkd",
    "//rs/crypto/tree_hash",
    "//rs/interfaces",
    "//rs/interfaces/state_manager",
    "//rs/phantom_newtype",
    "//rs/protobuf",
    "//rs/replicated_state",
    "//rs/test_utilities/state",
    "//rs/test_utilities/types",
    "//rs/types/base_types",
    "//rs/types/management_canister_types",
    "//rs/types/types",
    "@crate_index//:assert_matches",
    "@crate_index//:bincode",
    "@crate_index//:mockall",
    "@crate_index//:prost",
    "@crate_index//:serde",
    "@crate_index//:strum",
]

rust_library(
    name = "consensus",
    testonly = True,
    srcs = glob(["src/**"]),
    crate_name = "ic_test_utilities_consensus",
    version = "0.9.0",
    deps = DEPENDENCIES,
)

rust_test(
    name = "consensus_test",
    crate = ":consensus",
)
